<?php

class EntrySubmitForm extends CFormModel
{
	public $name;
	public $email;
	public $upload;
	public $contestId;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			array('name, email, upload, contestId', 'required'),
			array('email', 'email'),
			array('upload', 'file', 'types'=>'jpg, gif, png'),
		);
	}

	/**
	 * Decalres the attribute labels.
	 */
	public function attributeLabels()
	{
		return array(
			'name' => Yii::t('label','Name'),
			'email' => Yii::t('label', 'E-mail'),
			'upload' => Yii::t('label','Image'),
		); 
	}
}
